package stat;

public class Stat {
	private int index;
	private double bArea;
	private double vArea;
	private int vNums;
	private String ratio;
	public Stat(int index, double bArea, double vArea, int vNums) {
		super();
		this.index = index;
		this.bArea = bArea;
		this.vArea = vArea;
		this.vNums = vNums;
	}
	public Stat(int index, BallStat ballStat, VoidStat voidStat) {
		this.index = index;
		this.bArea = ballStat.getSquare();
		this.vArea = voidStat.getSumOfAreas();
		this.vNums = voidStat.getNumberOfVoids();
		this.ratio = bArea == 0 || vArea == 0? " " : ""+(Math.round(vArea/bArea*10000)/100.0)+"%";
	}
	public int getIndex() {
		return index;
	}
	public String getbArea() {
		return bArea == 0 ? " " : bArea+"";
	}

	public String getvArea() {
		return vArea == 0? " " : vArea+"";
	}
	public String getvNums() {
		return vNums == 0? " " : vNums+"";
	}
	public String getRatio() {
		return ratio;
	}


}
